Skip to content

Support OpenBW client on macOS (including M series) - #108

Merged
JasperGeurtz merged 2 commits into
developfrom
macos-openbw-support
Nov 7, 2026
Merged

JasperGeurtz merged 2 commits into
developfrom
macos-openbw-support

Conversation

@JasperGeurtz

@JasperGeurtz JasperGeurtz commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes POSIX shared memory and UNIX domain socket client connections on macOS (including Apple Silicon / arm64) when connecting to OpenBW's BWAPILauncher linux-client-support branch by @Bytekeeper :

  • Use PosixShm.INSTANCE.shm_open in getSharedMemory(): getGameTable() already used PosixShm.INSTANCE.shm_open (which loads librt only on Linux and uses libc/libSystem on macOS), whereas getSharedMemory() still called LibRT.INSTANCE.shm_open directly and failed on macOS with UnsatisfiedLinkError: Unable to load library 'rt'.
  • Close shm_open fd after mmap: Close fd in a finally block via LibCExt.INSTANCE.close(fd) in both getGameTable() and getSharedMemory() to prevent file descriptor leaks while polling for a game.
  • Use NativeLong for mmap length and offset: Matches the C ABI signature on both 32 & 64-bit
  • Upgrade junixsocket so native JNI libraries for macOS M series (aarch64-MacOSX) are included.

Also add

  • Lightweight Linux OpenBW E2E GitHub Action (e2e-linux.yml): Replaced the disabled Docker/Wine workflow with a cached native OpenBW build (compiled with clang and lightweight MPQs from dgant/mpqs) that runs a headless 1v1 LAN match of MarineHell vs SittingDuck on (2)Destination.scx with race = Terran.

  • MarineHell test bot scouting fix (MarineHell.java): Excluded self.getStartLocation() from the scout target list and prevented the scout SCV from being reassigned to mine enemy minerals, stopping it from kiting SittingDuck's PlayerGuard SCVs back into MarineHell's own undefended mineral line (where OpenBW's unimplemented isUnderAttack() prevented workers from fighting back).

@JasperGeurtz
JasperGeurtz merged commit f586151 into develop Nov 7, 2026
11 checks passed
@JasperGeurtz
JasperGeurtz deleted the macos-openbw-support branch November 8, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant